@charset "UTF-8";
@import "./variables.scss";

/**
* normalize 7.0
* http://necolas.github.io/normalize.css/
*/
html {
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  height: 100%;
}

body {
  margin: 0;
  font-size: $font-size;
  font-family: $font-family;
  line-height: 1.2;
  color: $text-color;
  background-color: $background-color;
  min-height: 100%;
  /* Iphone X 兼容*/
  /* 兼容 iOS < 11.2 */
  padding-top: constant(safe-area-inset-top);
  padding-left: constant(safe-area-inset-left);
  padding-right: constant(safe-area-inset-right);
  padding-bottom: constant(safe-area-inset-bottom);
  /* 兼容 iOS >= 11.2 */
  padding-top: env(safe-area-inset-top); /* 为导航栏+状态栏的高度 88px */
  padding-left: env(safe-area-inset-left); /* 如果未竖屏时为0 */
  padding-right: env(safe-area-inset-right); /* 如果未竖屏时为0 */
  padding-bottom: env(safe-area-inset-bottom); /* 为底下圆弧的高度 34px */
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
  display: block;
}

audio,
canvas,
progress,
video {
  display: inline-block;
}

audio:not([controls]) {
  display: none;
  height: 0;
}

progress {
  vertical-align: baseline;
}

[hidden],
template {
  display: none!important;
}

a {
  background: transparent;
  -webkit-text-decoration-skip: objects;
  text-decoration: none;
  color: nth($link-color, 1);

  &:active {
    outline: 0;
  }
}

abbr[title] {
  border-bottom: none;
  text-decoration: underline;
  text-decoration: underline dotted;
}

b,
strong {
  font-weight: inherit;
}

b,
strong {
  font-weight: bold;
}

dfn {
  font-style: italic;
}

mark {
  background: #ff0;
  color: #000;
}

small {
  font-size: 80%;
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sup {
  top: -0.5em;
}

sub {
  bottom: -0.25em;
}

img {
  border: 0;
  vertical-align: middle;
  max-width: 100%;
}

svg:not(:root) {
  overflow: hidden;
}

pre {
  overflow: auto;
  white-space: pre;
  white-space: pre-wrap;
  word-wrap: break-word;
}

code,
kbd,
pre,
samp {
  font-family: monospace, monospace;
  font-size: 1em;
}

button,
input,
optgroup,
select,
textarea {
  color: inherit;
  font: inherit;
  margin: 0;
  vertical-align: middle;
}

button,
input,
select {
  overflow: visible;
}

button,
select {
  text-transform: none;
}

button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
  -webkit-appearance: button;
  cursor: pointer;
}

[disabled] {
  cursor: default;
}

button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0;
}

input {
  line-height: normal;
}

input[type="checkbox"],
input[type="radio"] {
  box-sizing: border-box;
  padding: 0;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

input[type="search"] {
  -webkit-appearance: textfield;
  box-sizing: border-box;
}

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

fieldset {
  border: 1px solid #c0c0c0;
  margin: 0 2px;
  padding: 0.35em 0.625em 0.75em;
}

legend {
  box-sizing: border-box;
  color: inherit;
  display: table;
  max-width: 100%;
  padding: 0;
  white-space: normal;
}

textarea {
  overflow: auto;
  resize: vertical;
  vertical-align: top;
}

optgroup {
  font-weight: bold;
}

input,
select,
textarea,
button {
  outline: 0;
}

textarea,
input {
  -webkit-user-modify: read-write-plaintext-only;
}

input::-ms-clear,
input::-ms-reveal {
  display: none;
}

input::-moz-placeholder,
textarea::-moz-placeholder {
  color: $placeholder-color;
}

input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
  color: $placeholder-color;
}

input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  color: $placeholder-color;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

td,
th {
  padding: 0;
}

/* 根据使用习惯，对normalize上进行补充 */
h1, h2, h3, h4, h5, h6, p, figure, form, blockquote {
  margin: 0;
}

ul, ol, li, dl, dd {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none outside none;
}

h1, h2, h3 {
  line-height: 2;
}

h1 {
  font-size: calc(#{$font-size-large} * 1.2);
}

h2 {
  font-size: $font-size-large;
}

h3 {
  font-size: $font-size;
}

i {
  font-style: normal;
}

@if $box-border-switch {
  * {
    box-sizing: border-box;
  }
}